package LeetCode;

public class LC_278_FirstBadVersion {

    public static void main(String[] args) {

    }

    public class Solution {
        public int firstBadVersion(int n) {
            int low = 1, high = n;

            while (low < high) {
                int mid = low + (high - low) / 2;
                if (isBadVersion(mid))
                    high = mid;
                else
                    low = mid + 1;
            }

            return low;
        }

        boolean isBadVersion(int version) {
            return true;
        }

    }
}